{include inc/top.m.html}
<script src="{__CURTPL_URL__}js/ga.js"></script>
<script src="{__DATA_URL__}dialog/lhgdialog.min.js?self=true&skin=discuz"></script>
<script>
    var _number = 0;
    var api = frameElement.api, W = api.opener;
    var loading = '<img src="{__DATA_URL__}images/loading.gif"/>&nbsp; 加载中....';
    var queue   = [];
    $(function(){
        api.size( 340 , 'auto');
        debug();
    });

    function debug(){
        var n  = queue.shift();
        if(n != undefined){
            var url  = $('#item_' + n).attr('ajaxurl');
            var lobj = $('#item_' + n).find('.loading');
            lobj.html(loading);
            $.getJSON(url , function(d){
                lobj.html(d.msg);
                setTimeout( 'debug()' , 200);
            });
        }
    }
</script>
<div class="index-main" style="width:100%;margin:0;background:#fff;padding:5px 0 20px 0;">
    <ol style="text-align:left;line-height:30px;margin:0 10px;list-style:none;padding:0;">
        <li style="background:#f7f7f7;color:#811">&nbsp;&nbsp;&nbsp;{$config['name']}</li>
    {foreach $config['rule'] $k $v}
        <li style="{$k_index % 2 === 0 ? 'background:#f7f7f7':'background:#fff'};padding:2px 10px" id="item_{$k_index}" class="item" ajaxurl="{url:'admin@gather-debug-id-%d-k-%d-r-%s' , $id , $kv , $v['key']}">{$k_index}. {$v['name']}
            <span class="loading"></span>
            <script>queue.push({$k_index});</script>
        </li>
    {/foreach}
    </ol>
    <br/>
    <div class="clear"></div>
</div>
{include inc/bottom.html}